#include "AvgEmoGraph.h"
#include "Renderer.h"

using namespace irr; 
using namespace core;
using namespace gui; 
using namespace video; 
using namespace scene; 

CAvgEmoGraph::CAvgEmoGraph()
{
	CRenderer*		pRender = CRenderer::Instance();
	ISceneNode*		pSceneNode;

	pSceneNode = pRender->AddBox(vector3df(-210, 10, 0), 
								 vector3df(5, 20, 2), SColor(255, 255, 100, 100));
	pSceneNode->setVisible(false);
	pSceneNode->setName("a_1");

	pSceneNode = pRender->AddBox(vector3df(-210, -10, 0), 
								 vector3df(5, 20, 2), SColor(255, 100, 100, 255));
	pSceneNode->setVisible(false);
	pSceneNode->setName("a_2");

	m_positive = m_negative = 0;
}

CAvgEmoGraph::~CAvgEmoGraph()
{

}

void CAvgEmoGraph::SetValue(float positive, float negative)
{
	CRenderer*		pRender = CRenderer::Instance();
	ISceneManager*	pSceneMgr	= pRender->SceneManager();
	ISceneNode*		pSceneNode;

	pSceneNode = pSceneMgr->getSceneNodeFromName("a_1");

	m_positive = positive;
	m_negative = negative;

}
